package com.shuaigequtan.order.openfeign.controller;

import com.shuaigequtan.order.openfeign.service.PaymentFeignService;
import com.shuaigequtan.result.MsgResponseBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/consumer")
public class OpenFeignConsumerController {
    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping("/getPayment/{id}")
    public MsgResponseBody getPaymet(@PathVariable("id") Long id){
        return paymentFeignService.getById(id);
    }
}
